function initializeResolution() {
    var windowWidth = window.innerWidth;
    var windowHeight = window.innerHeight;
    var pixelRatio = window.devicePixelRatio || 1; /// get pixel ratio of device

    canvasMain = document.getElementById("main_wrapper");

    canvasMain.width = windowWidth * pixelRatio;   /// resolution of canvas
    canvasMain.height = windowHeight * pixelRatio;

    canvasMain.style.width = windowWidth + 'px';   /// CSS size of canvas
    canvasMain.style.height = windowHeight + 'px';
}